<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="http://www.springframework.org/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>QP工具业务统计表</title>
<jsp:include page="../../head.jsp"/>
<script type="text/javascript" src="../js/ajaxutil.js"></script>
</head>
<script type="text/javascript">
	var formSetting = {
		title : "QP工具业务统计表",
		module : 'query',
		numCount : '2',
		columns : [ {
			index : "REGDATE",
			name : "regDate",
			type : "date",
			label : "统计时间起",
			op : "ge"
		}, {
			index : "REGDATE",
			name : "regDate",
			label : "统计时间止",
			type : "date",
			op : "le"
		} ],
		buttons : {
			custom : []
		},
		grid : {
			id : "dataGrid",
			title : "查询结果",
			url : "report-findQPReport2",
			colModel : [ {
				index : "COM_NAME",
				name : "com_name",
				label : "公司名称"
			}, {
				index:"AMOUNT",
				name:"amount",
				label:"业务量"
			}],
			sortname: "",
			rowNum:100,
			jsonReader : {
				//root : "customerBizReports"
			},
			loadComplete:function(data){
                var total = 0;
                if(data) data.content.map(function(row){total+=(row.amount-0);});
                if($(dataGrid).find('td:contains("合计票数")').size()==0){
                    var a = $(("<tr class=\"ui-widget-content jqgrow ui-row-ltr\"><td style='text-align:right;'>合计票数:</td><td>"+total+"</td></tr>"));$(dataGrid).append(a);
                }
			}
		}
	};
	$(document).ready(function() {
		$("#dataTable").mrdForm(formSetting);
	});
</script>
<body>
	<div id="dataTable"></div>
</body>
</html>